package com.zkdcloud.repository;

import com.zkdcloud.domain.PaymentPlatform;
import org.jfaster.mango.annotation.DB;
import org.jfaster.mango.annotation.SQL;
import org.springframework.stereotype.Repository;

/**
 * @author zk123
 * @version 2018/5/24
 */
@Repository
@DB(table = "payment_platform")
public interface PaymentPlatformDao {
    String COLUMNS = "id,name,icon,create_time";

    /**
     * 添加
     *
     * @param paymentPlatform
     */
    @SQL("insert into #table("+COLUMNS+")values(:id,:name,:icon,:createTime)")
    void add(PaymentPlatform paymentPlatform);

    /**
     * 根据id获取
     *
     * @param id id
     * @return payment
     */
    @SQL("select * from #table where id = :1")
    PaymentPlatform getOne(String id);
}
